#include "stdafx.h"
#include "SyncEventDemultiplexer.h"

int PASCAL FAR SyncEventDemultiplexer::select(
                        _In_ int nfds,
                        _Inout_opt_ fd_set FAR *readfds,
                        _Inout_opt_ fd_set FAR *writefds,
                        _Inout_opt_ fd_set FAR *exceptfds,
                        _In_opt_  const struct timeval FAR *timeout)
{
	/*int result = ::select(nfds, readfds, writefds,exceptfds,timeout);

	if(result < 0)
	{
		result = WSAGetLastError();
	}*/

	return ::select(nfds, readfds, writefds,exceptfds,timeout);
}

bool SyncEventDemultiplexer::isInSet(SOCKET h, fd_set* set)
{
	return FD_ISSET(h, set);
}


